<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="format-detection" content="telephone=no">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">

    <script src="../../assets/js/jquery-3.4.1.min.js"></script>
    <script src="../../assets/js/constants.js"></script>
    <script src="../../assets/js/bootstrap.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script src="../../assets/js/layer.js"></script>

    <link rel="stylesheet" href="../../assets/css/bootstrap.min.css" id="layuicss-layer">

    <style>
        .main-warp {
            width: 100%;
            height: 100%;
        }
    </style>
</head>

<body>
    <div class="main-warp">
        <span>
            {{message}}
        </span>
    </div>
</body>

<script>

    var vue = new Vue({
        el: '.main-warp',
        data: {
            message: "TestMessage"
        },
        methods: {

        },
    })

    history.pushState(null, null, location.href);
    window.addEventListener("popstate", function (event) {
        console.log(event)
        history.pushState(null, null, location.href);
        vue.message = "点击了返回键"
    })

</script>

</html>